<nav class="navbar navbar-sidebar">
    <ul class="nav nav-sidenav-primary">
      <li ng-repeat="primaryItem in navItems" ng-if="in_array(primaryItem.groups)" ng-class="{ active: primaryItem === activePrimary }">
        <a ng-if="primaryItem.href && in_array(primaryItem.groups) " ng-href="{{navURL(primaryItem.href)}}">
          <span class="{{primaryItem.iconClass}}"></span> {{primaryItem.label}}
        </a>
        <a ng-if="!primaryItem.href && in_array(primaryItem.groups)" href="" data-toggle="dropdown" class="dropdown-toggle">
          <span class="{{primaryItem.iconClass}}"></span> {{primaryItem.label}} <span class="fa fa-angle-right"></span>
        </a>
        <div ng-if="primaryItem.secondaryNavSections.length" class="hover-nav dropdown-menu hidden-xs">
          <ul class="nav nav-sidenav-secondary">
            <li ng-repeat-start="secondarySection in primaryItem.secondaryNavSections" ng-if="secondarySection.header" class="dropdown-header">
              {{secondarySection.header}}
            </li>
            <li ng-repeat="secondaryItem in secondarySection.items" ng-if="in_array(secondaryItem.groups)" ng-class="{ active: secondaryItem === activeSecondary }">
              <a ng-href="{{navURL(secondaryItem.href)}}">{{secondaryItem.label}}</a>
            </li>
            <li ng-repeat-end style="display:none;"></li>
          </ul>
        </div>
        <div ng-if="primaryItem.secondaryNavSections.length" class="hover-nav visible-xs-block">
          <ul class="nav nav-sidenav-secondary">
            <li ng-repeat-start="secondarySection in primaryItem.secondaryNavSections" ng-if="secondarySection.header" class="dropdown-header">
              {{secondarySection.header}}
            </li>
            <li ng-repeat="secondaryItem in secondarySection.items" ng-class="{ active: secondaryItem === activeSecondary }">
              <a ng-href="{{navURL(secondaryItem.href)}}">{{secondaryItem.label}}</a>
            </li>
            <li ng-repeat-end style="display:none;"></li>
          </ul>
        </div>
      </li>
    </ul>
    <!-- Group utility links into single nav -->
    <navbar-utility-mobile></navbar-utility-mobile>
</nav>
